<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>筛选数组案例</title>
    <script>
        // 把数组中工资超过3000的删除 
        var arr = [1412,5432,2311,1233,2555,2431,1434]
        var newarr = []
        for (var i = 0; i < arr.length;i++) {
            if(arr[i] < 3000) {
                newarr.push(arr[i])
            }
        }
        console.log(newarr);
    </script>
</head>
<body>
    
</body>
</html>